﻿using System.Collections.Generic;
using System.Linq;

namespace StreetPacMan.Server
{
    public static class EnumerableExtensions
    {
        public static IEnumerable<T> ExceptNulls<T>(this IEnumerable<T> source) where T : class
        {
            return source.Where(x => x != null);
        }
    }

    //public static class EnumExtensions
    //{
    //    public static T As<T>(this int source) 
    //    {
    //        return Enum.Parse(typeof(T),)
    //        return source.Where(x => x != null);
    //    }
    //}
}